<!DOCTYPE html PUBLIC 
    "-//W3C//DTD XHTML 1.1 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<%@taglib prefix="s" uri="/struts-tags" %>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Index</title>
    <s:head />
        <style type="text/css" title="currentStyle">
            @import "./media/css/demo_page.css";
            @import "./media/css/demo_table.css";

            #demo{  margin:2em;
                    width:95%;
                    line-height:150%;}
}
        </style>
        <script type="text/javascript" language="javascript" src="./media/js/jquery.js"></script>
        <script type="text/javascript" language="javascript" src="./media/js/jquery.dataTables.js"></script>
        <script type="text/javascript" charset="utf-8">
	        var aDataSet = [
					["Thinking in C++","Bruce Eckel","10/10/2004","C++","Cpp,Bruce", "<a href='book.action'>edit</a> <a href='#'>delete</a>"],
					["Thinking in Java","Bruce Eckel","10/10/2004","Java","Java,Bruce", "<a href='book.action'>edit</a> <a href='#'>delete</a>"],
					["Thinking in Python","Bruce Eckel","10/10/2004","Python","Python,Bruce", "<a href='book.action'>edit</a> <a href='#'>delete</a>"],
					["Thinking in Ruby","Bruce Eckel","10/10/2004","Java","Ruby,Bruce", "<a href='book.action'>edit</a> <a href='#'>delete</a>"],
					["Thinking in PHP","Bruce Eckel","10/10/2004","Java","PHP,Bruce", "<a href='book.action'>edit</a> <a href='#'>delete</a>"],
					["Thinking in C","Bruce Eckel","10/10/2004","C","C,Bruce", "<a href='#'>edit</a> <a href='book.action'>delete</a>"],
					["Thinking in JS","Bruce Eckel","10/10/2004","JS","Javascript,Bruce", "<a href='book.action'>edit</a> <a href='#'>delete</a>"],
					["Thinking in Network","Bruce Eckel","10/10/2004","Network","Network,Bruce", "<a href='book.action'>edit</a> <a href='#'>delete</a>"]
	        ];
            $(document).ready(function() {
                $('#example').dataTable( {
                    "bProcessing": true,
                    "aaData": aDataSet,
                    "aoColumns": [
                                  { "sTitle": "Book Name" },
                                  { "sTitle": "Author" },
                                  { "sTitle": "Publish Date" },
                                  { "sTitle": "Category", "sClass": "center" },
                                  { "sTitle": "Tags" },
                                  { "sTitle": "Action", "sClass": "center" }
                                 ]
                                  
                } );
            } );
        </script>
</head>
<body>
    <!-- <s:form action="helloWorld">
        <s:textfield label="What is your name?" name="name" />
        <s:textfield label="What is the date?" name="dateNow" />
        <s:submit />
    </s:form>
 -->
 <div class = "item">
<h2>Book List</h2>
<div id="demo">
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
</table>
<input type="button" value="Add Book" onclick="javascript:location.href='books.action?method=add'">
<s:url id="url" action="books!input" />

<a href="<s:property value="#url"/>">Add New Book</a>


</div>
<div class="spacer"></div> 
</div>
</body>
</html>
    